x = eval(input('请输入行车距离:'))
if x <=0:
  print('行车距离输入有误')
elif x <= 3:
  y = 10
elif x <= 10:
  y = 10 + 2.1 * (x - 3)
else:
  y = 10 + 2.1 * 7 + 3 * (x-10)
print('行车距离为{}, 费用一共需要{:.2f}'.format(x, y))